package com.eugenes.jvm;

import java.io.File;

public class TestClassLoader {
    
    private static final String TEST_CLASS_NAME = "com.eugenes.jvm.TestModule";
    private static final long SLEEP_TIME = 10 * 1000 /* ms */;
    
    public static void main(String[] args) throws InterruptedException {
        while (true) {
            try {
                System.out.println(new OnFlyClassLoader().loadClass(TEST_CLASS_NAME).newInstance());   
            } catch (ClassNotFoundException | InstantiationException | IllegalAccessException ex) {
                System.out.println(ex);
            }
            
            Thread.sleep(SLEEP_TIME);
        }
    }
}
